#include "../QCommon/events.h"
#include <iostream>
using namespace std;
enum HandlerType
{abstract_h,msg_h,network_h,file_ask_h,file_answer_h};

class AbstractHandler
{
public:
    HandlerType type;
    AbstractHandler()
    {
        type=abstract_h;
    }
    virtual void handle(AbstractEvent&){}
};

class MsgHandler:public AbstractHandler
{
public:
    MsgHandler()
    {
        type=msg_h;
    }
    virtual void handle(AbstractEvent&);
};

class NetworkHandler:public AbstractHandler
{
public:
    NetworkHandler()
    {
        type=network_h;
    }
    virtual void handle(AbstractEvent&);
};

class FileAskHandler:public AbstractHandler
{
public:
    FileAskHandler()
    {
        type=file_ask_h;
    }
    virtual void handle(AbstractEvent&);
};

class FileAnswerHandler:public AbstractHandler
{
public:
    FileAnswerHandler()
    {
        type=file_answer_h;
    }
    virtual void handle(AbstractEvent&);
};
